package cn.rxls.community.controller;



import cn.rxls.community.dto.cardRolls.PageCardRollsDTO;
import cn.rxls.community.result.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.rxls.community.entity.CardRolls;
import cn.rxls.community.service.CardRollsService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.Serializable;
import java.util.List;

/**
 * 卡卷(CardRolls)表
 *
 */
@RestController
@RequestMapping("cardRolls")
@Validated
public class CardRollsController   {
    /**
     * 服务对象
     */
    @Resource
    private CardRollsService cardRollsService;

    /**
     * 根据状态分页查询所有数据
     *
     * @param dto 分页对象
     * @return 所有数据
     */
    @GetMapping("/page/state")
    public Result<?> selectPageByState(@Valid @ModelAttribute PageCardRollsDTO dto) {
        return Result.success(cardRollsService.selectPageByState(dto));
    }


}

